package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the USR_CONVENIO_PERMISO database table.
 * 
 */
@Entity
@Table(name="USR_CONVENIO_PERMISO")
public class UsrConvenioPermiso implements Serializable {
	private static final long serialVersionUID = 1L;
	private UsrConvenioPermisoPK id;
	private String estado;
	private UsrConvenio usrConvenio;

    public UsrConvenioPermiso() {
    }


	@EmbeddedId
	public UsrConvenioPermisoPK getId() {
		return this.id;
	}

	public void setId(UsrConvenioPermisoPK id) {
		this.id = id;
	}
	

	@Column(length=1)
	public String getEstado() {
		return this.estado;
	}

	public void setEstado(String estado) {
		this.estado = estado;
	}


	//bi-directional many-to-one association to UsrConvenio
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="COD_CONVENIO", referencedColumnName="COD_CONVENIO", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="USR_ID", referencedColumnName="USR_ID", nullable=false, insertable=false, updatable=false)
		})
	public UsrConvenio getUsrConvenio() {
		return this.usrConvenio;
	}

	public void setUsrConvenio(UsrConvenio usrConvenio) {
		this.usrConvenio = usrConvenio;
	}
	
}